<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>消息发送历史--人资系统</title>
<script type="text/javascript" src="<c:url value='/static/js/admin/qiye/message/list.js' />"></script>
</head>
<body>
	<form id="form" method="post" action="<c:url value='/admin/qiye/message/list' />" name="form">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong>消息发送历史</strong>
			</div>
			<!--<div class="padding border-bottom">
				<div class="line">
					 <div class="x4">
						<button type="button" class="button button-small bg-main dialogs" data-toggle="click" data-target="#mydialog" data-mask="1" data-width="50%">批量导入</button>
					</div>
					<div class="x5"></div>
					<div class="x3">
						<div class="input-group padding-little-top">
							<input type="text" class="input input-small border-main" placeholder="请输入：商品名称" /> 
							<span class="addbtn"><button type="submit" class="button input-small bg-main">筛选</button></span>
						</div>
					</div> 
				</div>
			</div>-->
			<table class="table table-hover">
				<tr>
					<th width="100">接收对象</th>
					<th width="100">
						<div class="field">
							<select name="type" onchange="javascript:this.form.submit();">
								<option value="-1">消息类型</option>
								<option value="0" <c:if test="${type == 0 }">selected="selected"</c:if>>文本消息</option>
								<option value="1" <c:if test="${type == 1 }">selected="selected"</c:if>>图文消息</option>
							</select>
						</div>
					</th>
					<th width="*">标题</th>
					<th width="*">简介</th>
					<th width="200">发布时间</th>
					<th width="100">操作</th>
				</tr>
				<c:forEach items="${pager.datas}" var="pd">
					<tr>
						<td>${pd.target}</td>
						<td><c:if test="${pd.type == 0 }">文本消息</c:if> <c:if test="${pd.type == 1 }">图文消息</c:if></td>
						<td>${pd.title}</td>
						<td>${pd.description}</td>
						<td><fmt:formatDate value="${pd.publishTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
						<td>
							<a class="button border-green button-little" onclick="findDetail(${pd.id})" href="javascript:void(0);">详情</a>
						</td>
					</tr>
				</c:forEach>
			</table>
			<jsp:include page="../../../commons/pager.jsp">
				<jsp:param value="list" name="url" />
			</jsp:include>
		</div>
	</form>
	
<div id="detail-body" style="display: none;">
	<div class="dialog-mask" style="z-index:10000"></div>
	<div class="dialog-win" style="position:fixed; width:500px; z-index:10001; left:50%; top:50%;margin-left: -250px;margin-top: -265px; ">
		<div class="dialog open">
			<form id="detail-form" class="form">
				<div class="dialog-head">
					<span id="detail-close" class="close"></span>
					<strong id="detail-title">消息详情</strong>
				</div>
				<div class="dialog-body">
					<div id="detail-content" style="height:400px;overflow: auto;">
					</div>
				</div>
				<div class="dialog-foot">
					<!-- <button id="detail-save" type="button" class="button bg-green">发送</button> -->
					<button id="detail-cancel" type="button" class="button dialog-close">关闭</button>
				</div>
			</form>
		</div>
	</div>
</div>
</body>
</html>